<?php
/*
 * Created by generator
 *
 */

class ListLienActivitesAdherentss extends Controller {

	/**
	 * Constructeur
	 */
	function ListLienActivitesAdherentss(){
		parent::Controller();
		$this->load->model('LienActivitesAdherents_model');
		$this->load->library('session');
		$this->load->helper('url');
	}

	/**
	 * Affichage des LienActivitesAdherentss
	 */
	public function index(){
		$data['lienactivitesadherentss'] = LienActivitesAdherents_model::getAllLienActivitesAdherentss($this->db);
		$this->load->view('listlienactivitesadherentss_view', $data);
	}

	/**
	 * Ajout d'un LienActivitesAdherents
	 */
	public function add(){

		// Insertion en base
		$model = new LienActivitesAdherents_model();
		$model->xaaidact = $this->input->post('xaaidact'); 
		$model->save($this->db);

		$this->session->set_flashdata('message', 'Nouveau LienActivitesAdherents ajoute');
		
		// Recharge la page avec les nouvelles infos
		redirect('listlienactivitesadherentss/index'); 
	}

	/**
	 * Suppression d'un LienActivitesAdherents
	 * @param $xaaidact identifiant a supprimer
	 */
	function delete($xaaidact){
		LienActivitesAdherents_model::delete($this->db, $xaaidact);

		$this->session->set_flashdata('message', 'LienActivitesAdherents supprime');

		redirect('listlienactivitesadherentss/index'); 
	}

}
?>
